home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14079 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  43 lines

  1. Path: anvil.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Mouse Event Handler
  5. Date: 11 Apr 1996 11:00:46 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4kjhceINNffv@anvil.ugrad.cs.ubc.ca>
  8. References: <316B59B1.359D@natlab.research.philips.com>
  9. NNTP-Posting-Host: anvil.ugrad.cs.ubc.ca
  10.  
  11. In article <316B59B1.359D@natlab.research.philips.com>,
  12. niessene  <niessene@natlab.research.philips.com> wrote:
  13.  >Can somebody tell me why the following programm doesn't work?
  14.  >It only goes one time in the ISR. I'm using Borland C++ 4.5.
  15.  >
  16.  >#include <stdio.h>
  17.  >#include <dos.h>
  18.  >#include <conio.h>
  19.  >
  20.  >void interrupt far nieuwint33() {
  21.  > sound(1500);
  22.  > delay(10);
  23.  > nosound();  }
  24.  >
  25.  >void main()  {
  26.  >  union REGS reg;
  27.  >  struct SREGS sreg;
  28.  >  int oldmask;
  29.  >  void * oldhandler;
  30.  >
  31.  >// reset mouse
  32.  >  reg.x.ax=0;
  33.  >  int86(0x33, ®, ®);
  34.  
  35. ^^^  because it is recursively triggering itself? Duh!!!
  36.  
  37. Keep this OS/hardware-specific shit off this newsgroup. "<conio.h>", "interrupt
  38. far", and "union REGS" and "int86" are not part of the C language. Only a
  39. fraction of the people who read this newgroup are interested in these things,
  40. and know the proper places to read or post about them.
  41. -- 
  42.  
  43.